<template>
  <div id="app">
    <!-- <img src="./assets/logo.png">
    <div>
      <p>
        If Element is successfully added to this project, you'll see an
        <code v-text="'<el-button>'"></code>
        below
      </p>
      <el-button>el-button</el-button>
    </div>
    <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <el-container>
      <el-aside width="150px">
        <el-menu :default-openeds="['1', '3']" router>
          <el-submenu index="1">
            <template slot="title"
              ><i class="el-icon-tickets"></i>记录</template
            >

            <el-menu-item index="/record/normal">通用</el-menu-item>
            <el-menu-item index="/record/vat">气缸</el-menu-item>
            <el-menu-item index="1-3">滚子</el-menu-item>
            <el-menu-item index="1-3">曲轴</el-menu-item>
            <el-menu-item index="1-3">SPC</el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title"><i class="el-icon-menu"></i>预留</template>
            <el-menu-item-group>
              <template slot="title">分组一</template>
              <el-menu-item index="2-1">选项1</el-menu-item>
              <el-menu-item index="2-2">选项2</el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group title="分组2">
              <el-menu-item index="2-3">选项3</el-menu-item>
            </el-menu-item-group>
            <el-submenu index="2-4">
              <template slot="title">选项4</template>
              <el-menu-item index="2-4-1">选项4-1</el-menu-item>
            </el-submenu>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title"
              ><i class="el-icon-setting"></i>系统设置</template
            >
            <el-menu-item index="/system/hardware">硬件设置</el-menu-item>
            <el-menu-item index="3-4-1">MQTT设置</el-menu-item>
            <el-menu-item index="3-4-1">预留</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <el-header>量仪信息采集后台管理系统</el-header>
        <el-main >
          <router-view />
        </el-main>
        <el-footer>©2021 珠海凌达信息办 邹文轩. All rights reserved.</el-footer>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// import HelloWorld from './components/HelloWorld.vue'

export default {
  name: "app",
  // components: {
  //   HelloWorld
  // }
  data() {
    return {
      // mainHeight: 0,
    };
  },
  // mounted() {
    // this.updateMainHeight();
    // window.onresize = () => {
    //   this.updateMainHeight();
    // };
  // },
  // methods: {
  //   updateMainHeight() {
  //     this.mainHeight = this.$refs.mainHeight.$el.offsetHeight;
  //   },
  // },
};
</script>

<style>
/* #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
html,
body,
#app,
.el-container {
  padding: 0vw;
  margin: 0vw;
  height: 100%;
}

.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  padding: 1px !important;
  /* line-height: 160px; */
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>
